Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Registrar classes #83

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jjgrainger
Copy link
Owner

This PR refactors Post Type and Taxonomy classes by moving the logic to handle registering types to WordPress to their own separate Registrar classes. This is a large change but will help towards making the codebase more maintainable.

  • Provide a separation between classes that handle setting data (PostTypes\PostType) and those that handle the logic to register objects to WordPress (PostTypes\Registrar\PostType\Registrar).
  • PostType and Taxonomy classes can focus more on interface and providing a clean API for engineers to use.
  • "Registrar" classes can focus on the logic of registering post types and taxonomies to WordPress.
  • Separation will improve test coverage by separating code that can be tested in isolation and code that requires integration with WordPress.
  • Makes the code cleaner to read and easier to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant